package cn.lpz.service;

import cn.lpz.dao.IAccountDao;
import cn.lpz.domian.Account;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("AccountService")
public class AccountServiceimpl implements IAccountService {
    @Autowired
    IAccountDao iAccountDao;
    @Override
    public List<Account> findAll() {
        System.out.println("。。。。。。。。业务层：查询所有账户");
        List<Account> all = iAccountDao.findAll();
        for (Account account:all){
            System.out.println(account);
        }
        return null;
    }
    @Override
    public void saveAccount(Account account) {
        System.out.println("。。。。。。。。业务层：保存信息");
        iAccountDao.saveAccount(account);
    }
}
